package com.liang.threaddemo9;


import java.util.concurrent.ArrayBlockingQueue;

public class Demo {
    public static void main(String[] args) throws InterruptedException {

        ArrayBlockingQueue<String> list = new ArrayBlockingQueue<>(1);

        Cookie1 c = new Cookie1(list);
        Foodie1 f = new Foodie1(list);

        c.setName("厨师");
        f.setName("吃货");
        f.start();
        c.start();

    }
}
